home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Tech Arsenal 1
/
Tech Arsenal (Arsenal Computer).ISO
/
tek-01
/
cuj1008.zip
/
RAMEY.ZIP
/
815.ZIP
/
KEY.H
next >
Wrap
C/C++ Source or Header
|
1992-05-28
|
2KB
|
45 lines
/*
Postman's Sort (R) Version 1.0
Copyright (c) Robert Ramey 1991. All Rights Reserved
*/
/*********************************************************************
data structure for collating sequence values
**********************************************************************/
typedef struct {
unsigned int
order, /* highest value in table */
value[256]; /* table of weights fore 256 possible bytes */
} SEQ;
/*********************************************************************
data structure and storage for holding keys as specified in the
command line
**********************************************************************/
/* structure for a key */
typedef struct {
unsigned int rfield; /* index of field within record */
unsigned int disp; /* starting point of key with in field */
unsigned int size; /* maximum size of key */
unsigned int key_type; /* flag to indicate type of field */
BOOLEAN inverted; /* reverse the sense of sort for this key */
SEQ *seq; /* pointer to structure of collating values */
} KEY;
#define DEFAULT 0 /* default type of alphanumeric key */
#define SIGN 1 /* an optional 1 character sign */
#define NUMERIC 2 /* digits to be expanded to fixed width */
#define FRACTION 3 /* fractional part of a number */
extern KEY key[]; /* table of keys specified in command line */
extern unsigned int
key_count, /* number of keys */
tab_count;
extern size_t
*tab,
data_offset,
record_offset;
#define blk_offset (record_offset-1)